import request from '@/utils/request'

export default {
  getUserList(params) {
    return request({
      url: '/system/user/list',
      method: 'get',
      params: params
    })
  },
  createUser(data) {
    return request({
      url: '/system/user/create',
      method: 'post',
      data
    })
  },
  updateUser(data) {
    return request({
      url: `/system/user/update/${data.id}`,
      method: 'put',
      data
    })
  },
  deleteUser(data) {
    return request({
      url: `/system/user/delete`,
      method: 'delete',
      data
    })
  },
  resetUserPassword(id) {
    return request({
      url: `/system/user/password/reset/${id}`,
      method: 'post'
    })
  }
}
